<template>
    <div class="common-layout">
        <el-container>
            <el-header>
                <NuxtLink to="/" class="title">apkpick</NuxtLink>
                <div class="b-title">{{ pageTitle }}</div>
            </el-header>
            <el-main><NuxtPage /></el-main>
        </el-container>
    </div>
</template>
<script setup>
const route = useRoute()
const pageTitle = computed(() => {
    switch (route.path) {
        case '/other/about':
            return 'About Us'
        case '/other/privacy':
            return 'Privacy Policy'
        case '/other/disclaimer':
            return 'Disclaimer'
        case '/other/terms':
            return 'Terms of Service'
        default:
            return 'APKpick'
    }
})
</script>
<style scoped lang="scss">
.common-layout {
    .el-header {
        width: 100%;
        height: 340px;
        background-color: rgba(34,110,147,1);
        background-image: url('@/assets/img/back-img.png');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        padding: 20px;
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        .title {
            color: #fff;
            font-size: 1rem;
            font-weight: 300;
            margin-bottom: 10px;
            position: absolute;
            top: 20px;
            left: 20px;
            text-decoration: none;
        }
        .b-title {
            font-size: 6rem;
            color: #fff;
            font-weight: lighter;
        }
        
        @media screen and (max-width: 768px) {
            height: 250px;
            .b-title {
                font-size: 4rem;
            }
        }
    }
}

</style>
  